package com.example.tests;

import org.testng.annotations.Test;

import com.example.utils.SortedListOf;

import static org.junit.Assert.assertThat;
import static org.hamcrest.Matchers.*;


public class AddressRemovalTests extends TestBase{
	
	@Test
	public void deleteSomeAddress(){
		
		//save old state
		SortedListOf <AddressData> oldList  = app.getContactHelper().getAddressFirstName();
		
		//actions
		app.getContactHelper().deleteAddress(0);
		
		//save new state
		SortedListOf <AddressData> newList  = app.getContactHelper().getAddressFirstName();
	    
	    //compare states
		assertThat(newList, equalTo(oldList.without(0)));
	}

}
